from django.conf.urls import patterns, url
from . import views

urlpatterns = patterns(
    '',
    url(regex=r'^meta/$',
        view=views.display_meta,
        name='display_meta'
        ),
    url(regex=r'^metatemplate/$',
        view=views.display_meta_template,
        name='display_meta_template'
        ),
    url(regex=r'^search-form/$',
        view=views.search_form,
        name='search_form'
        ),
    url(regex=r'^search/$',
        view=views.search,
        name='search'
        ),
    url(regex=r'^myform/$',
        view=views.my_form_post,
        name='my_form',
        ),
    url(regex=r'^css/$',
        view=views.css,
        kwargs={},
        name='css'
        ),
    url(regex=r'^css/(?P<name>\w+)/$',
        view=views.css_name,
        name='css_name'
        ),
    url(regex=r'^csspost/$',
         view=views.css_post,
         name="css_post"
         ),
    url(regex=r'^test_js/(?P<template_name>\w+)?$',
        view=views.test_js,
        name='test_js'
        ),
    url(regex=r'^$',
        view=views.ListView.as_view(),
        name='index'
        ),
    url(regex=r'^(?P<pk>\d+)/$',
        view=views.DetailView.as_view(),
        name='detail'
        ),
    url(regex=r'^create-polls/$',
        view=views.PollCreateView.as_view(),
        name='create',
        ),
    url(regex=r'^(?P<pk>\d+)/edit/$',
        view=views.PollEditView.as_view(),
        name='edit',
        ),
    url(regex=r'^(?P<pk>\d+)/delete/$',
        view=views.PollDeleteView.as_view(),
        name="delete",
        ),
    url(regex=r'^(?P<pk>\d+)/results/$',
        view=views.ResultsView.as_view(),
        name='results'
        ),
    url(regex=r'^(?P<poll_id>\d+)/vote/$',
        view=views.vote,
        name='vote'
        ),
    url(regex=r'^about/$',
        view=views.AboutView.as_view(),
        name="about"
        )
)
